<form method="post" action="" class="form-inline">
	<select id="petition_type" name="petition_type">
		<option value="salary" <?php echo ($petition_type=="salary")? "selected":"" ?>>ฎีกาเงินเดือน</option>
		<option value="welfare" <?php echo ($petition_type=="welfare")? "selected":"" ?>>ฎีกาผู้มีสิทธิ์</option>
		<option value="utility" <?php echo ($petition_type=="utility")? "selected":"" ?>>ฎีกาค่าสาธารณูปโภค</option>
		<option value="petition" <?php echo ($petition_type=="petition")? "selected":"" ?>>ฎีการายจ่ายเพื่อการลงทุน</option>
	</select>
	<button type="submit" class="btn btn-primary">ตกลง</button>
</form>


<?php
	//echo "finance.php"
	require_once("includes/connect.php");
	require_once("includes/function.php");

	$petition_type = $_REQUEST["petition_type"];

	if(isset($petition_type)) {
		switch ($petition_type) {
			case "petition":
				include_once("inc_petition.php");
				break;
			case "salary":
				include_once("inc_salary.php");
				break;
			case "welfare":
				include_once("inc_welfare.php");
				break;
			case "utility":
				include_once("inc_utility.php");
				break;
		}
	}
?>
